<template>
	<van-nav-bar :title="componentModel.title" :left-arrow="componentModel.leftArrowVisible" @click-left="onClickLeft">
	</van-nav-bar>
</template>

<script>
	import {
		sendComponentEventRequest
	} from '@/utils/requestUtils.js';
	import utils from '@/utils/utils.js';
	export default {
		name:"NavBarComponent",
		props:["componentModel"],
		inject:['children'],
		mounted() {
			this.children.push(this);
		},beforeUnmount() {
			utils.removeArrayElement(this.children,this);
		},methods: {
			onClickLeft() {
				if(!this.componentModel.leftArrowVisible){
					return;
				}
				sendComponentEventRequest(this, "leftArrowClickEvent", {});
			}
		},
	}
</script>

<style>
	
</style>
